package behavioral.command;

/**
 * @Description: 命令模式测试类
 * @Author: lxt
 * @CreateDate: 2019/11/1
 **/
public class CommandTest {
    public static void main(String[] args) {
        ICommand televisionCommand = new TelevisionCommand();
        ICommand airConditioner = new AirConditionerCommand();

        Invoker invoker = new Invoker();

        invoker.setCommand(televisionCommand);

        invoker.start();
        invoker.stop();

        invoker.setCommand(airConditioner);

        invoker.start();
        invoker.stop();
    }
}
